﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharedLib.MessageFramework.Messages;

namespace SharedLib.MessageFramework
{
    public class MessageException : Exception
    {
        IAppMessage _msg;

        public IAppMessage AppMessage
        {
            get { return _msg; }
            private set { _msg = value; }
        }

        public MessageException(IAppMessage appMessage, string textMessage):base(textMessage)
        {
            AppMessage = appMessage;
        }

        public MessageException(IAppMessage appMessage, string textMessage, Exception innerException)
            : base(textMessage, innerException)
        {
            AppMessage = appMessage;
        }
    }
}
